﻿/// <reference path="../GeneratedArtifacts/viewModel.js" />

myapp.ViewPerson.created = function (screen) {
    // Write code here.
    screen.getCanUpdatePerson().then(function success() {
        screen.findContentItem("EditPerson").isEnabled = true;
        screen.findContentItem("AddPersonFlagMulti").isEnabled = true;
    }, function error() {
        screen.findContentItem("EditPerson").isEnabled = false;
        screen.findContentItem("AddPersonFlagMulti").isEnabled = false;
    });
};